-
-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(platform): Create and Delete API Keys #726
base: develop
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍(Review updated until commit 2dddd1a)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 2dddd1a Explore these optional code suggestions:
Previous suggestions✅ Suggestions up to commit 2dddd1a
✅ Suggestions up to commit fe320d4
|
if (!newApiKeyData.expiryDate) { | ||
toast.error('Expiry Date is required') | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Fix loading state on validation error
if (!newApiKeyData.expiryDate) { | |
toast.error('Expiry Date is required') | |
return | |
} | |
if (!newApiKeyData.expiryDate) { | |
toast.error('Expiry Date is required') | |
setIsLoading(false) | |
return | |
} |
I'll hold up this PR for a while. The designs are incomplete in figma ig. Once we have them, we can merge it. |
Sure, will add up the new things in this branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API call changes listed in delete API key. please replicate that in create api key aswell
apps/platform/src/components/userProfile/apiKeys/addApiKeyDialog/index.tsx
Outdated
Show resolved
Hide resolved
apps/platform/src/components/userProfile/apiKeys/addApiKeyDialog/index.tsx
Outdated
Show resolved
Hide resolved
apps/platform/src/components/userProfile/apiKeys/addApiKeyDialog/index.tsx
Outdated
Show resolved
Hide resolved
apps/platform/src/components/userProfile/apiKeys/confirmDeleteApiKey/index.tsx
Outdated
Show resolved
Hide resolved
apps/platform/src/components/userProfile/apiKeys/confirmDeleteApiKey/index.tsx
Outdated
Show resolved
Hide resolved
apps/platform/src/components/userProfile/apiKeys/confirmDeleteApiKey/index.tsx
Outdated
Show resolved
Hide resolved
Got you. |
@poswalsameer, please resolve all open reviews! |
PR closed due to inactivity |
PR closed due to inactivity |
@poswalsameer, please resolve all open reviews; otherwise this PR will be closed after Sun Feb 16 2025 19:27:57 GMT+0000 (Coordinated Universal Time)! |
… fixed minor issues
… toast, and added action toast to show the API key
17c7dcc
to
33bfe05
Compare
User description
Description
This PR adds the feature of creating and deleting API keys. Also, added the grid to show all the available API Keys.
Mentions
@rajdip-b
Screenshots of relevant screens
keyshade-apiKey.mp4
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
Enhancement, Tests
Description
Added functionality to create, display, and delete API keys.
Introduced UI components for managing API keys, including dialogs and cards.
Integrated API key management with backend controllers and state management.
Updated SVG assets and utility functions to support new features.
Changes walkthrough 📝
index.ts
Added CrownSVG to shared SVG assets
apps/platform/public/svg/shared/index.ts
CrownSVG
to the exported SVG assets.page.tsx
Integrated API key management into profile page
apps/platform/src/app/(main)/(settings)/settings/@profile/page.tsx
index.tsx
Added dialog component for creating API keys
apps/platform/src/components/userProfile/apiKeys/addApiKeyDialog/index.tsx
index.tsx
Added card component for displaying API keys
apps/platform/src/components/userProfile/apiKeys/apiKeyCard/index.tsx
index.tsx
Added confirmation dialog for deleting API keys
apps/platform/src/components/userProfile/apiKeys/confirmDeleteApiKey/index.tsx
controller-instance.ts
Added ApiKeyController to controller instance
apps/platform/src/lib/controller-instance.ts
ApiKeyController
to the controller instance.index.ts
Added state management for API keys
apps/platform/src/store/index.ts
index.ts
Exported ApiKeyController in API client
packages/api-client/src/index.ts
ApiKeyController
from the API client package.